Skip to content

PROF-16707 Reject ddprof-owned allocator hooks at startup - #1012

Open
jbachorik wants to merge 37 commits into
mainfrom
dd/there-is-something-weird-going-on-when-both-the-native-ixsr
Open

jbachorik wants to merge 37 commits into
mainfrom
dd/there-is-something-weird-going-on-when-both-the-native-ixsr

Conversation

@jbachorik

@jbachorik jbachorik commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?:
Rejects Java native-memory profiling startup when the allocator's current or retained forwarding targets resolve to ddprof hooks. It adds ELF-image admission checks and startup tests for conflicting profilers.

Motivation:
Prevent simultaneous allocation profilers from routing samples through ddprof-owned hooks, which can corrupt attribution or count the same allocation through multiple profilers.

Additional Notes:
This PR remains a draft because the Linux acceptance tests have not run on the pushed head. Human review is mandatory for the shared-library identity and lifetime behavior.

The committed-range review found no Critical or High findings. It found one Medium defect: a valid SysV hash chain with exactly MAX_HASH_CHAIN_STEPS entries is rejected. It also identified two validation gaps: integration tests use the stand-in rather than released ddprof binaries, and a GNU libc banner without the literal glibc can omit the IFUNC fixture and make its test skip. These remain open on the pushed head.

How to test the change?:

  • qualityChecks: passed before the rebase at 44ca9543 (build/logs/20261117-164019-qualityChecks.log); not rerun on the pushed head.
  • buildRelease and :ddprof-test:testClasses: passed at pre-rebase candidate 9d054557; not verified on the pushed head.
  • :ddprof-lib:gtestDebug: passed locally before the rebase (build/logs/20261118-155739-_ddprof-lib_gtestDebug.log) on a worktree that also contained uncommitted review fixes; not evidence for the pushed head.
  • Linux real-ddprof x86_64/aarch64 acceptance tests and the zstd bridge remain unverified; the prior workspace attempt was blocked by SSH authentication. The separate musl container attempt was blocked by Vault OIDC access.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a security review.
  • This PR doesn't touch any of that.
  • JIRA: PROF-16707

Unsure? Have a question? Request a review!

@jbachorik jbachorik added the AI label Nov 17, 2026
@dd-octo-sts

dd-octo-sts Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmccnms
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 21.1.8 (6ubuntu1)
Date:Tue Nov 17 15:46:55 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs2
Logic error
Dereference of null pointer1
Unused code
Dead initialization1

Filter Results by File

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead initializationreferenceChains.cppapplyOomRamp4971
Logic errorDereference of null pointerperfEvents_linux.cppunregisterThread72026

@dd-octo-sts

dd-octo-sts Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #45069475120 | Commit: 7ab8206 | Duration: 22m 26s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - ✅ - -
8-ibm - ✅ - -
8-j9 ✅ ✅ - -
8-librca - - ✅ ✅
8-orcl - ✅ - -
11 - ✅ - -
11-j9 ✅ ✅ - -
11-librca - - ✅ ✅
17 ✅ ✅ - -
17-graal ✅ ✅ - -
17-j9 ✅ ✅ - -
17-librca - - ✅ ✅
21 ✅ ✅ - -
21-graal ✅ ✅ - -
21-librca - - ✅ ✅
25 ✅ ✅ - -
25-graal ✅ ✅ - -
25-librca - - ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-11-22 21:24:56 UTC

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Pipelines

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 4 Pipeline jobs failed

Bits review gate | publish (95ac270) — 🔧 Needs a code fix, caused by this PR

View more details · View in GitHub Actions

DataDog/java-profiler | integration-test-x64-glibc: [hotspot, 8]

View more details · View in GitLab

DataDog/java-profiler | integration-test-x64-glibc: [openj9, 8]

View more details · View in GitLab

View all 4 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 95ac270 | Docs | View more details | Give us feedback!

@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The new sanitizer guards fail preprocessing under GCC 13, blocking native-test compilation. Both affected files require the same portability fix.

Open Bits AI session

🤖 Bits Code Review · Commit 44ca954

@jbachorik
jbachorik force-pushed the dd/there-is-something-weird-going-on-when-both-the-native-ixsr branch from 44ca954 to cca182f Compare November 18, 2026 19:23
@jbachorik jbachorik added the human_review:mandatory Human review required — see PR description label Nov 18, 2026
@jbachorik
jbachorik force-pushed the dd/there-is-something-weird-going-on-when-both-the-native-ixsr branch 2 times, most recently from d45495f to 59b62d4 Compare November 19, 2026 17:25
@jbachorik jbachorik added the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 19, 2026
@jbachorik

jbachorik commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

🐶 babysit-pr is watching this PR — CI breakages and mechanical findings are fixed and pushed automatically; design decisions are always brought to you.

This run
  • 17:55 · started · CI on head 59b62d40 — check-formatting red (spotless in ddprof-test), codeowner gate pending approval, Bits pending
  • 18:20 · CI red · check-formatting — :ddprof-test:spotlessJavaCheck in NativememDdprofExclusionTest, fixing
  • 18:45 · answered · Bits P2 thread on mallocAdmission_ut.cpp — sanitizer guard already fixed by e94aaf7
  • 18:50 · pushed (pending) · fix cycle 1 — spotless reformat + zero bloom_size fail-closed guard (GNU-hash admission) with gtest
  • 09:03 · started · new run (previous died mid-push-cycle; its fix cycle 1 landed) — CI on head c3210778 in progress; publish + codeowner-review red, Bits pending
  • 09:14 · answered · stale Bits P2 thread on mallocAdmission_ut.cpp — reply posted (fix f415c61 was already on head); @datadog review posted for c3210778 (draft PR)
  • 09:19 · Bits · review returned FAIL on c3210778 — P2: SysV chain terminated exactly at MAX_HASH_CHAIN_STEPS reported CHAIN_LIMIT (refuses native-memory start)
  • 09:24 · CI red · dd-gitlab/gtest-release-amd64 + gtest-release-arm64 + gtest-asan-amd64 — elfparser_ut dynamicSectionMisalignedEntries / dynamicSectionInvalidRelocationEntrySize: new LoadedImage::readable() requires PF_R, fixtures leave p_flags zeroed
  • 09:52 · pushed · fix cycle 2 — 3c49260bd..531fcb381: SysV terminator-at-cap fix + boundary test; elfparser_ut fixtures marked PF_R|PF_X; verified in glibc container (aarch64 debug)
  • 10:14 · answered · Bits P1 thread on ddprofStandin_linux.c (GCC 4.8.5 __builtin_*_overflow) — file outside worker scope; operator applied and pushed 9636bde76
  • 10:22 · Bits · @datadog review posted for 9636bde76 — review returned PASS
  • 10:49 · CI green · all gtest/test-matrix/stresstest/fuzz suites green on 9636bde76; EL7 functional green (GCC 4.8 fix confirmed)
  • 10:58 · retried · dd-gitlab integration-test-x64-glibc [hotspot,8] and [openj9,8] — tar cache-extraction errors (infra-looking), one rerun each triggered
  • 11:00 · stopped · run cap (2h) reached — left for humans: codeowner approval, integration-test rerun outcome
  • 20:28 · started · new run — head 327e11802: CI green except codeowner-review/head (human approval pending — watching, no pushes) and dd-gitlab/post-pr-comment (GitLab job; no worker access to retry)
  • 20:59 · pushed · 18add5ec5 + 95ac270ad (rebased on main merge 242daa785) — spin-readiness wait + failure-path cleanup; Sphinx reviews: 0 crit/high (1 LOW/INFO listed)
  • 20:59 · answered · Bits P2 thread on ExternalLauncher.startSpinThread — fix commits named, one reply posted
  • 21:37 · Bits · auto-review still pending on 95ac270ad 40 min after push — @datadog review posted once per operator go-ahead
  • 21:37 · CI red · dd-gitlab/post-pr-comment failed on a 2nd consecutive head (327e11802, 95ac270ad) — flagged infra issue; parent session owns the GitLab retry
  • 21:42 · Bits · review returned PASS on 95ac270ad (after the @datadog review request) — no new findings
  • 20:28 · Bits · PASS on 327e11802 — new trusted P2 thread on ExternalLauncher.startSpinThread (spin-thread readiness race); fix drafted, push held pending operator decision
  • 22:16 · stopped · run cap (2h) reached mid-poll (platform timeout killed the last sleep; parent session performed the stop edits) — no roster approval had landed

Run stopped (cap). Commits pushed: 18add5ec5 (spin-readiness wait), 95ac270ad (stop the spin workload on every failed or aborted start) — both SSH-signed, pushed through the pre-push gates with fresh Sphinx markers; pushed on top of merge 242daa785 that appeared on the branch from a non-worker source (likely GitHub "Update branch"). Findings answered: Bits P2 spin-readiness race (thread 4646135406) — fixed by those commits. Findings flagged: dd-gitlab/post-pr-comment failed on two consecutive heads (~19:02Z, ~21:35Z) — comment-poster only, non-gating, no programmatic retry available (mosaic API is SPA-only unauthenticated); left for the author to retry from the mosaic UI. Untrusted github-code-quality[bot] comment (4646143288) not acted on per the trust gate. dog-sitter label never existed to remove; a human_review:mandatory label (not worker-added) is present. PR was un-drafted outside the worker. Threads left for humans: none open from trusted authors; the human gate remains — codeowner-review/head failure requires an APPROVED review from @DataDog/profiling-java (kaahos / rkennke / thegreystone / zhengyu123, not the author) bound to head 95ac270ad. Bits re-triggers posted this run: 95ac270ad (once). bits_triggered heads carried: 9636bde76, ef100a06b, 6857f7dec, 93c951e23, 327e11802, 95ac270ad. bits_rerequested: none. replied thread roots: 4603337880, 4640551607, 4641105194, 4641858311, 4641959972, 4646135406.

✅ stopped 22:20 UTC · cap reached — CI green and Bits PASS on 95ac270ad; blocked only on the codeowner human approval

@jbachorik
jbachorik force-pushed the dd/there-is-something-weird-going-on-when-both-the-native-ixsr branch from 59b62d4 to c321077 Compare November 20, 2026 09:02
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

A valid SysV hash chain containing exactly 65,536 entries is treated as exhausted, so native-memory profiling can reject startup for an allocator image without ddprof hooks.

Open Bits AI session

🤖 Bits Code Review · Commit c321077

@jbachorik jbachorik added dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates and removed dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates labels Nov 20, 2026
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

EL7 functional runs compile the new JNI helper with GCC 4.8.5, which lacks its overflow builtins. Affected native test invocations will terminate with unresolved-symbol errors.

Open Bits AI session

🤖 Bits Code Review · Commit 531fcb3

@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Runtime compatibility with released ddprof binaries and Linux architecture/libc variants remains unverified; confidence is limited to static inspection.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 9636bde

@dd-octo-sts

dd-octo-sts Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

❌ 38 passed, 0 failed, 2 without a result out of 40 expected configurations

Test Matrix

Platform JDK 8 JDK 11 JDK 17 JDK 21 JDK 25
glibc-x64-hotspot ❔ ✅ ✅ ✅ ✅
glibc-x64-openj9 ❔ ✅ ✅ ✅ ✅
glibc-arm64-hotspot ✅ ✅ ✅ ✅ ✅
glibc-arm64-openj9 ✅ ✅ ✅ ✅ ✅
musl-x64-hotspot ✅ ✅ ✅ ✅ ✅
musl-x64-openj9 ✅ ✅ ✅ ✅ ✅
musl-arm64-hotspot ✅ ✅ ✅ ✅ ✅
musl-arm64-openj9 ✅ ✅ ✅ ✅ ✅

No result produced

These configurations wrote no validation log, so their outcome is unknown and
they are counted as failures. The job usually timed out or failed during setup;
see its log in the pipeline.

  • glibc-x64-hotspot-jdk8
  • glibc-x64-openj9-jdk8

Links

@jbachorik jbachorik removed the dog-sitter Actively watched by babysit-pr: fixes pushed through the repo gates label Nov 20, 2026
@jbachorik
jbachorik marked this pull request as ready for review November 20, 2026 11:23
@jbachorik
jbachorik requested a review from a team as a code owner November 20, 2026 11:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T11:25:43.684067Z 9636bde Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9636bde76e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The previously reported hash-chain boundary and libc-banner issues are already addressed at this head. Compatibility with released ddprof binaries remains unverified because this review was static.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 9636bde

@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

Installing the test stand-in after a profiling session exposes allocator hooks before their forwarding pointers are initialized. Persistent JVM callbacks can enter that window and crash the child JVM.

Open Bits AI session

🤖 Bits Code Review · Commit ef100a0

The rewritten LoadedImage::readable() only walks PT_LOAD segments with
PF_R set, as a loader reports them; the misaligned dynamic-section
fixtures left p_flags zeroed, so imageFingerprint() rejected their
import layout and returned 0. Model the real mapping with PF_R|PF_X.
lookupSysv() read the terminator word inside the loop but only tested
index at the top: a valid chain of exactly MAX_HASH_CHAIN_STEPS (65536)
entries left the loop holding the terminator 0 and was reported
CHAIN_LIMIT, which refuses native-memory profiling startup for the
image. Test the final read before reporting exhaustion; a chain that
still has an entry at the cap is unchanged, and the nchain cycle bound
still bounds loops. Boundary test mirrors GnuChainLimitBoundary:
65536 entries classify DDPROF, 65537 report CHAIN_LIMIT.
@jbachorik
jbachorik force-pushed the dd/there-is-something-weird-going-on-when-both-the-native-ixsr branch from 6857f7d to 316e037 Compare November 20, 2026 17:32

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

Static review identified no actionable defect in the specified range. Compatibility with released ddprof binaries and loader lifetime behavior remain unverified by runtime validation on this head.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 316e037

@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The SysV chain-boundary defect described in the PR body is already fixed in the reviewed head. Compatibility with released ddprof binaries and shared-library lifetime behavior remains unverified by execution.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 93c951e

@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR rejects ddprof-owned allocator targets at native-memory startup, and this update initializes stand-in forwarders before publishing hooks. One issue remains: the new workload lacks a readiness handshake, allowing a scheduling-dependent lifecycle-test failure; released-ddprof interoperability and loader lifetime behavior still lack runtime validation.

Open Bits AI session

🤖 Bits Code Review · Commit 327e118

Comment on lines +234 to +241
private static void startSpinThread() {
if (spinThread != null) {
throw new IllegalStateException("spin thread already running");
}
spinRunning = true;
spinThread = new Thread(ExternalLauncher::runSpinWorkload, "admission-spin");
spinThread.start();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Wait for the spin workload before continuing the scenario

If admission-spin is delayed until after INSTALL/rejection/RESTORE, SPINSTOP clears spinRunning before the workload enters its loop. spinRounds remains zero, so the new lifecycle assertion fails despite correct hook installation. Thread.start() does not guarantee readiness; wait for workload progress before continuing the scenario.

Suggested change
private static void startSpinThread() {
if (spinThread != null) {
throw new IllegalStateException("spin thread already running");
}
spinRunning = true;
spinThread = new Thread(ExternalLauncher::runSpinWorkload, "admission-spin");
spinThread.start();
}
private static void startSpinThread() throws InterruptedException {
if (spinThread != null) {
throw new IllegalStateException("spin thread already running");
}
spinRounds = 0;
spinRunning = true;
spinThread = new Thread(ExternalLauncher::runSpinWorkload, "admission-spin");
spinThread.start();
long deadline = System.nanoTime() + java.util.concurrent.TimeUnit.SECONDS.toNanos(5);
while (spinRounds == 0) {
if (!spinThread.isAlive() || System.nanoTime() - deadline >= 0) {
spinRunning = false;
throw new IllegalStateException("spin workload did not start within 5s");
}
Thread.sleep(1);
}
}

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by 18add5e + 95ac270 (rebased on the main merge): startSpinThread() now waits for the first completed round (5s deadline, 1ms poll) before INSTALL runs, so spinRounds can no longer stay 0 when SPINSTOP races the workload start; every failed start path (timeout, dead thread, interrupted wait) now clears spinRunning and joins the thread, and a scenario abort after SPINSTART stops the workload in a finally instead of leaving a non-daemon thread hanging the child JVM.

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The admission checks account for both current allocator imports and saved forwarding targets across restarts. The completed static review found no reportable defect; runtime compatibility with released ddprof binaries was not established.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 327e118

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

The PR rejects ddprof-owned allocator targets at startup and fixes stand-in hook publication ordering. Two test defects remain: the previously reported spin-workload readiness race and a non-atomic loader-thread stop flag; compatibility with released ddprof binaries and loader lifetime behavior still lack runtime validation.

Open Bits AI session

🤖 Bits Code Review · Commit 242daa7

if (!e) _exit(CHILD_START_UNEXPECTED);
if (strcmp(e.message(), DDPROF_LITERAL) != 0) _exit(CHILD_FAIL);
}
g_loader_loop_stop = 1;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Make the loader-thread stop flag atomic

When the concurrent loader scenario runs, loaderLoop reads g_loader_loop_stop while the scenario thread writes it before joining. volatile sig_atomic_t provides no synchronization between pthreads, so the test itself has a C++ data race and can trigger TSan reports in configurations that execute it. Include and use std::atomic, or use atomic builtins for both accesses.

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

Thread.start() does not guarantee the admission-spin workload entered its
loop before SPINSTOP runs; wait for the first completed round (5s deadline)
so the rounds>0 lifecycle assertion cannot race the thread scheduler.
Clean up the spin-thread state on every startSpinThread failure path
(timeout, dead thread, interrupted wait) and stop a running workload in
a scenario-abort finally, so an aborted child JVM cannot hang waiting
for the non-daemon admission-spin thread.
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-3 datadog-prod-us1-3 Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The completed static review found no reportable defect. Compatibility with released ddprof binaries and Linux loader lifetime behavior still requires runtime acceptance.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 95ac270

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI human_review:mandatory Human review required — see PR description

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant